#include <iostream>
#include <fstream>
#include <string>

#define FILENAME "log.txt"

int main()
{
  std::ofstream out(FILENAME, std::ios::binary);
  if(!out.is_open())
  {
    return 1;
  }
  
  std::string message = "hello C++\n";
  out.write(message.c_str(), message.size());

  out.close();

  return 0;
}
